const path = require('path')
const requireDir = require('require-dir')

const NODE_ENV = process.env.NODE_ENV || 'dev'
const commonConfig = requireDir('./common')
const config = Object.assign({ NODE_ENV }, commonConfig)
const root = path.join(__dirname, NODE_ENV)

var _config = requireDir(root)

module.exports = Object.assign(config, _config)
